package com.cashmama.market.api.domain.config;

import com.google.common.util.concurrent.ThreadFactoryBuilder;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;

/**
 * @author daixianjun
 * 所有线程池在这里管理
 */
public class ThreadPoolUtil {

    private static final ThreadFactory dealOrderThreadFactory = new ThreadFactoryBuilder()
            .setNameFormat("dealOrders-%d")
            .setDaemon(true)
            .build();

    public static final ExecutorService dealOrderThreadPool = Executors.newFixedThreadPool(5, dealOrderThreadFactory);
}
